Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Chris Proof of Principle #3

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

Chris Proof of Principle #3

wants to merge 20 commits into from

Conversation

chrisjsewell
Copy link
Member

No description provided.

@chrisjsewell
Copy link
Member Author

@ramirezfranciscof I'll leave this up for you to have a look at: https://aiida-blog.readthedocs.io/en/chris-branch/stories/visualising_graphs.html
Obviously its more of a Proof of Principle, than an actual PR for merging, but its certainly what I envisage for this documentation so feel free to ask any questions

@chrisjsewell chrisjsewell changed the title Chris branch Chris Proof of Principle Oct 14, 2020
from aiida.manage.external import postgres
from aiida.manage.tests import _GLOBAL_TEST_MANAGER, BACKEND_DJANGO
from aiida.common.utils import Capturing
# this is required on READTHEDOCS, since the docker container only contains C.UTF-8
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sphuber, quick question, is there a specific reason that _CREATE_DB_COMMAND is hard-coded to en_US.UTF-8. As commented, It's the only sticking point I had on getting this to work on RTD.

I'm planning to turn this into a small sphinx-extension,
so would probably want to make a PR to aiida-core, to change this in some way, to avoid this patch

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we applied this to have some consistency for the databases that are created by AiiDA, but I was not very close involved in that decision. This was mostly done between @giovannipizzi and @szoupanos if I remember correctly. If I understand correctly, you would apply the same change in aiida-core? Instead of hard coding utf-8 as encoding, use whatever is set by os.enivron['LANG']. I am not sure what the consequences of this would be.

What is the exact reason why having utf-8 fails for your use case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, you would apply the same change in aiida-core?

No probably just something like os.environ.get("AIIDA_DB_ENCODING", "en_US.UTF-8"), so nothing would change unless specified.

What is the exact reason why having utf-8 fails for your use case?

The RTD docker container does not set up en_US.UTF-8 or install locale. So I don't think there is any way to add it at run time.

https://github.com/readthedocs/readthedocs-docker-images/blob/master/Dockerfile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants